<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<script type="text/javascript">
	
</script>

<form id="pagerForm" method="post" action="${path }/admin/userRechargeableCard">
	<input type="hidden" name="likeRechargeCard" value="${likeRechargeCard }"/>
	<input type="hidden" name="geCreateTime" value="${geCreateTime }" />
	<input type="hidden" name="leCreateTime" value="${leCreateTime }" />
	<input type="hidden" name="eqStatus" value="${eqStatus }" />
	<input type="hidden" name="pageNum" value="${pageTurn.page }" />
	<input type="hidden" name="numPerPage" value="${pageTurn.pageSize }" />
	<input type="hidden" name="rel" value="${rel }" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${path }/admin/userRechargeableCard" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
                    <label>卡号：</label>
                </td>
                <td>
                	<input type="text" size="15" name="likeRechargeCard" value="${likeRechargeCard }"/>
                </td>

					<td>
						开始时间：
					</td>
					<td>
						<input type="text" value="${geCreateTime}" name="geCreateTime" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" style="float:left;"/>
						<a class="inputDateButton" href="javascript:;" style="float:left;">选择</a>
					</td>
					<td>
						结束时间：
					</td>
					<td>
						<input type="text" value="${leCreateTime}" name="leCreateTime" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" style="float:left;"/>
						<a class="inputDateButton" href="javascript:;" style="float:left;">选择</a>
					</td>
					<td>                                                                               
						状态：
						<select id="eqStatus" name="eqStatus">
							<option value="">请选择</option>
							<c:forEach var="object" items="${userRechargeableCardStatusMap}">
								<option value="${object.key }">${object.value }</option>
							</c:forEach>
						</select>
						<script type="text/javascript">
							jQuery('#eqStatus').val("${eqStatus }");
						</script>
					</td>
				<td>
					<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
				</td>
				<td>
					<a href="/template/temp.xlsx">模板下载</a>
				</td>
			</tr>
			
		</table>
		<script type="text/javascript">
		
		</script>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${path }/admin/userRechargeableCard/edit.do?rel=${rel}" rel="${rel}" target="dialog" width="610" height="550"><span>导入数据</span></a></li>
			<li><a class="add" href="${path }/admin/userRechargeableCard/update.do?rel=${rel}&bandType=1" target="selectedTodo" rel="ids" title="确定激活?"><span>批量激活</span></a></li>
			<li><a class="delete" href="${path }/admin/userRechargeableCard/update.do?rel=${rel}&bandType=2" target="selectedTodo" rel="ids" title="确定不激活?"><span>批量不激活</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="115">
  		<thead>
			<tr>
				<th>ID<label style="float:left"><input type="checkbox" class="checkboxCtrl" group="ids" /></label></th>
				<th>卡号</th>
				<th>有效期</th>
				<th>创建时间</th>
				<th>激活时间</th>
				<th>卡状态</th>
				<th>金额</th>
				<th>用户</th>
			</tr>
		</thead>
		  <tbody> 
		  			<c:choose>
						<c:when test="${null==userRechargeableCardList||userRechargeableCardList.isEmpty()}">
							<tr class="tatr2">
								<td colspan="8" align="center">暂无数据</td>
							</tr>
						</c:when>
						<c:otherwise>
							<c:forEach items="${userRechargeableCardList}" var="userRechargeableCardList">
								<tr target="id" rel="${userRechargeableCardList.id}">
								<td>
									<input type="checkbox" name="ids" id="ids" value="${userRechargeableCardList.id}"/>${userRechargeableCardList.id}
								</td>
								<td>${userRechargeableCardList.rechargeCard}</td>
								<td>
									<fmt:formatDate value="${userRechargeableCardList.validTime}" pattern="yyyy-MM-dd HH:mm:ss" />
								</td>
								<td>
									<fmt:formatDate value="${userRechargeableCardList.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
								</td>
								<td>
									<fmt:formatDate value="${userRechargeableCardList.activateTime}" pattern="yyyy-MM-dd HH:mm:ss" />
								</td>
								<td>${userRechargeableCardStatusMap[userRechargeableCardList.status]}</td>
								<td>${userRechargeableCardList.denomination}</td>
								<td>${userRechargeableCardList.userId}</td>
							</tr>
							</c:forEach>
						</c:otherwise>
					</c:choose>
		</tbody>
	</table>

    <div style="clear:both"></div>
    <div class="panelBar">
        <%@ include file="/inc/admin_pagination.jsp" %>
    </div>
</div>

